package net.xiduth.game.player.content.events.objects;

import net.xiduth.game.WorldObject;
import net.xiduth.game.WorldTile;
import net.xiduth.game.player.Player;
import net.xiduth.game.tasks.WorldTask;
import net.xiduth.game.tasks.WorldTasksManager;

/**
 * 
 * @author Jae <jae@xiduth.com>
 * 
 * @since <Oct 22, 2013>
 *
 */
public class AncientTempleHandler {
	
	public static void handleGap(final Player player,
			WorldObject object) {
	//	if (player.hasBossCReq = false) {
		//	player.getDialogueManager().startDialogue("SimpleMessage", "You must defeat all bosses in order to use this.");
		//} else {
		player.getDialogueManager().startDialogue("SimpleMessage", "You look down and all you see is darkness.");
		WorldTasksManager.schedule(new WorldTask() {
			@Override
			public void run() {
				player.getDialogueManager().startDialogue("AncientTempleEntrance");
			}
		}, 2);
//	}
	}	
	
	public static void handleWaveringMysticBarrier(final Player player,
			WorldObject object) {
		player.move(new WorldTile (3359, 9429, 0));
	}
	
	public static void enterRift(final Player player,
			WorldObject object) {
		player.move(new WorldTile (3297, 9824, 0));
	}
	
	public static void handleBarriers(final Player player,
			WorldObject object) {
		if (player.getX() == 3348 && player.getY() == 9420) {
			player.move(new WorldTile (3350, 9420, 0));
		}
		if (player.getX() == 3350 && player.getY() == 9420) {
			player.move(new WorldTile (3348, 9420, 0));
		}
		if (player.getX() == 3350 && player.getY() == 9421) {
			player.move(new WorldTile (3348, 9421, 0));
		}
		if (player.getX() == 3348 && player.getY() == 9422) {
			player.move(new WorldTile (3350, 9422, 0));
		}
		if (player.getX() == 3350 && player.getY() == 9422) {
			player.move(new WorldTile (3348, 9422, 0));
		}
		if (player.getX() == 3367 && player.getY() == 9420) {
			player.move(new WorldTile (3369, 9420, 0));
		}
		if (player.getX() == 3369 && player.getY() == 9420) {
			player.move(new WorldTile (3367, 9420, 0));
		}
		if (player.getX() == 3369 && player.getY() == 9421) {
			player.move(new WorldTile (3367, 9421, 0));
		}
		if (player.getX() == 3367 && player.getY() == 9421) {
			player.move(new WorldTile (3369, 9421, 0));
		}
		if (player.getX() == 3367 && player.getY() == 9422) {
			player.move(new WorldTile (3369, 9422, 0));
		}
		if (player.getX() == 3369 && player.getY() == 9422) {
			player.move(new WorldTile (3367, 9422, 0));
		}
	}	

}
